//
//  NSTimer+LSResolveCircularReference.m
//  TeacherEdu2016
//
//  Created by chenleping on 2018/12/7.
//  Copyright © 2018年 teacher of china. All rights reserved.
//

#import "NSTimer+LSResolveCircularReference.h"

@implementation NSTimer (LSResolveCircularReference)

+ (NSTimer *)resolve_scheduledTimerWithTimeInterval:(NSTimeInterval)inerval repeats:(BOOL)repeats block:(void (^)(NSTimer *timer))block{
    
    return [NSTimer scheduledTimerWithTimeInterval:inerval target:self selector:@selector(resolve_blcokInvoke:) userInfo:[block copy] repeats:repeats];
    
}
+ (void)resolve_blcokInvoke:(NSTimer *)timer {
    
    void (^block)(NSTimer *timer) = timer.userInfo;
    
    if (block) {
        
        block(timer);
        
    }
    
}
@end
